<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>文章列表</title>
  <link rel="stylesheet" href="/assets/lib/layui/css/layui.css">
  <link rel="stylesheet" href="/assets/css/public.css">
</head>

<body>
  <div class="layui-card">
    <div class="layui-card-header">文章列表</div>
    <div class="layui-card-body">
      <form class="layui-form" action="">
        <div class="layui-inline">
          <select name="cate_id" lay-verify="" id="all_categ">
            
          </select>
        </div>
        <div class="layui-inline">
          <select name="state" lay-verify="">
            <option value="">所有状态</option>
            <option value="已发布">已发布</option>
            <option value="草稿">草稿</option>
          </select>
        </div>
        <div class="layui-inline">
            <button class="layui-btn" lay-submit lay-filter="formDemo">筛选</button>
        </div>
      </form>
      
      <table class="layui-table">
        <colgroup>
          <col width="40%">
          <col width="15%">
          <col width="15%">
          <col width="15%">
          <col width="15%">
        </colgroup>
        <thead>
          <tr>
            <th>文章标题</th>
            <th>分类</th>
            <th>发布时间</th>
            <th>状态</th>
            <th>操作</th>
          </tr> 
        </thead>
        <tbody>
         
        </tbody>
      </table>
      <div id="demo7"></div>
    </div>
  </div>

  <script type="text/html" id="all_categories">
    <option value="">所有分类</option>
    {{each data}}
      <option value="{{$value.Id}}">{{$value.name}}</option>
    {{/each}}
  </script>
  <script type="text/html" id="article_list">
    {{each data}}
      <tr>
        <input type="hidden" id="{{$value.Id}}">
        <td>{{$value.title}}</td>
        <td>{{$value.cate_name}}</td>
        <td>{{$value.pub_date}}</td>
        <td>{{$value.state}}</td>
        <td>
          <a href="/article/article_editor.html?id={{$value.Id}}" class="layui-btn layui-btn-xs">编辑</a>
          <button data-id="{{$value.Id}}" type="button" class="layui-btn layui-btn-danger layui-btn-xs">删除</button>
         </td>
      </tr>
    {{/each}}
  </script>
  <script src="/assets/lib/jquery.js"></script>
  <script src="/assets/js/public.js"></script>
  <script src="/assets/lib/layui/layui.all.js"></script>
  <script src="/assets/lib/template-web.js"></script>
  <script src="/assets/js/article/article_list.js"></script>
</body>

</html>